﻿'use strict';

resumeApp.controller('homeCtrl', ['$scope', 'homeData', function homeCtrl($scope, homeData) {
    $scope.obj = {};
    $scope.obj.things = homeData.query();
    console.log($scope.obj.things);
    //this does not use a promise
    //homeData.getData(function (data) {
    //    $scope.obj.things = data;
    //});
}]);

resumeApp.controller('NavbarController', ['$scope', '$location', function NavbarController($scope, $location) {
    $scope.getClass = function(path) {
        //console.log("path:" + path);
        //console.log("$location.path:" + $location.path().substr(0, path.length));
        if ($location.path().substr(0, path.length) == path) {
            return true;
        } else {
            return false;
        }
    };
}]);